import {axios} from '@/utils/request'

let apiInfo = {
    baseURL: process.env.VUE_APP_API_BASE_URL_ANALYSIS,
    token: '6a3fa0e35de4404f84f770407207229d',
}

export function identityList(data) {
  const analysisPath = data && data.analysisPath ? data.analysisPath : ''
  const pageNo = !data || !data.pageNo ? 1: data.pageNo
  const pageSize = !data || !data.pageSize ? 10: data.pageSize
  return axios({
    baseURL: apiInfo.baseURL,
    // headers: {token:apiInfo.token},
    url: `/ma-api/analysis/list?pageNo=${pageNo}&pageSize=${pageSize}&analysisPath=${analysisPath}`,
    method: 'get'
  })
}

export function save(data) {
  return axios({
    baseURL: apiInfo.baseURL,
    // headers: {token:apiInfo.token},
    url: `/ma-api/analysis/save`,
    method: 'post',
    data
  })
}

export function del(data) {
  return axios({
    baseURL: apiInfo.baseURL,
    // headers: {token:apiInfo.token},
    url: `/ma-api/analysis/del/?analysisPath=${data}`,
    method: 'delete'
  })
}